package com.shigen.demo.atguigu;

import java.util.concurrent.atomic.AtomicInteger;

/**
 * @author shigenfu
 * @date 2022/5/21 9:00 下午
 */
public class AutoInteger {

  public static void main(String[] args) {

    AtomicInteger atomicInteger = new AtomicInteger(5);

    boolean b = atomicInteger.compareAndSet(50, 20001);

    System.out.println(b + " " + atomicInteger.get());


  }

}
